import req from '../fetch/index.js'

const config = {
    // 获取菜单列表
listMenu: {
        url: '/pc/menu/listMenu',
    method:'post'
    },
    // 根据角色获取菜单列表
    returnMenuByRole: {
        url: '/pc/menu/returnMenuByRole',
        method:'post'
    },
    // 新增菜单
addMenu: {
    url: '/pc/menu/addMenu',
    method:'post'
    },
    // 修改菜单
updateMenu: {
    url: '/pc/menu/updateMenu',
    method:'post'
    },
    // 查询菜单
getMenu: {
    url: '/pc/menu/getMenu',
    method:'post'
    },
    // 删除菜单
deleteMenu: {
    url: '/pc/menu/deleteMenu',
    method:'post'
    },
    // 获取用户头像
  returnUser: {
    url: '/pc/user/returnUser',
    method:'post'
},
  
}
const request = function (funcName, requestParam) {
  return req(config[funcName].url, config[funcName].method, requestParam, {}, config[funcName].fileConfig)
}
export default request
